﻿using TaskPollingWebApi.Models;
using TaskPollingWebApi.ServicesImpl;

namespace TaskPollingWebApi.Services
{
    public interface ITaskPollingService
    {
        /// <summary>
        /// 启动轮询服务
        /// </summary>
        void Start();

        /// <summary>
        /// 停止轮询服务
        /// </summary>
        void Stop();

        /// <summary>
        /// 获取所有任务状态
        /// </summary>
        List<TaskStatusInfo> GetAllTasks();

        /// <summary>
        /// 根据ID获取任务状态
        /// </summary>
        TaskStatusInfo GetTaskById(int id);

        /// <summary>
        /// 获取当前轮询状态
        /// </summary>
        PollingStatus GetPollingStatus();
    }
}
